﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BOSS.Framework.Search.Context
{
    /// <summary>
    /// 搜索上下文工厂接口
    /// </summary>
    public interface ISearchContextFactory : ISearchContextParser
    {
        /// <summary>
        /// 根据内容类型创建搜索上下文
        /// </summary>
        /// <param name="contentType"></param>
        /// <returns></returns>
        ISearchContext CreateContext(string contentType);

        /// <summary>
        /// 根据内容类型创建搜索上下文
        /// </summary>
        /// <param name="contentType"></param>
        /// <param name="oneSortOnly"></param>
        /// <returns></returns>
        ISearchContext CreateContext(string contentType, bool oneSortOnly);

        /// <summary>
        /// 根据内容类型创建搜索上下文
        /// </summary>
        /// <param name="contentType"></param>
        /// <param name="template"></param>
        /// <returns></returns>
        ISearchContext CreateContext(string contentType, ISearchContext template);
    }
}
